from rpc_server import grpc_serve
import logging
from stock_service import Stocks
from stock import logout

if __name__ == '__main__':
    logging.basicConfig(level=logging.DEBUG, format='[%(asctime)s]--%(levelname)s--{%(message)s}')
    logging.info("更新genes中")
    Stocks.init_genes()
    logging.info("更新股票数据中")
    Stocks.init_stocks()
    # 创建线程来更新？
    logging.info('数据更新成功,启动grpc server')
    grpc_serve.grpc_serve()
    logout()

